 <template>
  <div class="app-container">
    <h1>App 根组件</h1>
    <button @click="flag = !flag">Toggle flag</button>
    <Test info="你好" v-if="flag"></Test>
    <hr />

    <div class="box">
      <!-- 渲染 Left 组件和 Right 组件 -->
      <Left></Left>
      <Right></Right>
    </div>
  </div>
</template>

<script>
//导入需要使用的 .vue 组件  ----   import xxx from '@/components/xxx.vue'
import Left from "@/components/Left.vue";
import Right from "@/components/Right.vue";
import Test from "@/components/Test.vue";

export default {
  data() {
    return {
      flag: true,
    };
  },
  methods: {},
  components: {
    //'Left': Left
    Left,
    Right,
    Test,
  },
};
</script>

<style lang="less">
.app-container {
  padding: 1px 20px 20px;
  background-color: #efefef;
}
.box {
  display: flex;
}
</style>
